package com.ltcode.sys.infrastructure.repository.impl;

import cn.hutool.core.collection.ListUtil;
import com.ltcode.sys.domain.model.SysRole;
import com.ltcode.sys.domain.repository.SysRoleRepository;
import com.ltcode.sys.infrastructure.persistence.converter.SysRoleConverter;
import com.ltcode.sys.infrastructure.persistence.entity.SysRolePO;
import com.ltcode.sys.infrastructure.persistence.mapper.SysRoleMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色仓储层实现
 */

@Repository
@AllArgsConstructor
public class SysRoleRepositoryImpl implements SysRoleRepository {

    private final SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> selectRoleList(SysRole role) {
        return ListUtil.empty();
    }

    @Override
    public List<SysRole> selectRolePermissionByUserId(Long userId) {
        List<SysRolePO> sysRolePOS = sysRoleMapper.selectRolePermissionByUserId(userId);
        return SysRoleConverter.toDomainList(sysRolePOS);
    }

    @Override
    public List<SysRole> selectRoleAll() {
        return ListUtil.empty();
    }

    @Override
    public List<Long> selectRoleListByUserId(Long userId) {
        return ListUtil.empty();
    }

    @Override
    public SysRole selectRoleById(Long roleId) {
        return null;
    }

    @Override
    public List<SysRole> selectRolesByUserName(String userName) {
        return ListUtil.empty();
    }

    @Override
    public boolean checkRoleNameUnique(SysRole role) {
        return false;
    }

    @Override
    public boolean checkRoleKeyUnique(SysRole role) {
        return false;
    }

    @Override
    public int updateRole(SysRole role) {
        return 0;
    }

    @Override
    public int insertRole(SysRole role) {
        return 0;
    }

    @Override
    public int deleteRoleById(Long roleId) {
        return 0;
    }

    @Override
    public int deleteRoleByIds(Long[] roleIds) {
        return 0;
    }

    @Override
    public int deleteAuthUser(Long roleId, Long userId) {
        return 0;
    }

    @Override
    public int deleteAuthUsers(Long roleId, Long[] userIds) {
        return 0;
    }

    @Override
    public int insertAuthUsers(Long roleId, Long[] userIds) {
        return 0;
    }
}
